<!--
名称: 下拉选择组件
作者: huangdi_cd
日期: 2021/4/15
说明: 用于快速统一构建弹窗页面
-->
<template>
    <el-select size="mini"
        default-first-option
        :multiple = 'multiple'
        filterable
        v-model="values"
        :values="values"
        :style="{width:`${setWidth}px`}"
        @change ='change(values)'
    >
        <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
        </el-option>
    </el-select>
</template>

<script>
    export default {
        name: 'ASelect',
        data () {
            return {
                values: ''
            }
        },
        props: {
            multiple: {
                type: String,
                default: 'false'
            },
            options: {
                type: Array
            },
            values: {
                type: Array
            },
            setWidth: {
                type: Number,
                default: 150
            }
        },
        methods: {
            change (values) {
                this.$emit('change', values)
            }
        }
    }
</script>

<style scoped>

</style>
